#ifndef __GLOBAL_FUNCTIONS_H__
#define __GLOBAL_FUNCTIONS_H__
#include <string>

BOOL IsNumber(char * str, int & number);
int NumTo7Segment(int num);
// show error message in standard format
void		ShowErrorMessage(const char *str);
HINSTANCE	GotoURL(LPCTSTR url, int showcmd);
CString		GetWindowsErrorMessage( );

inline unsigned skip_space( const std::string& buf, unsigned i=0 )
{
	while( isspace(buf[i] ) )
		i++ ;
	return i;
}


inline unsigned skip_word( const std::string& buf, unsigned i=0 )
{
	while( isalnum(buf[i] )  || buf[i]=='_' )
		i++ ;
	return i;
}


#endif